<template>
  <div id="app">
    <Parent @eat="eat"></Parent>
    <!-- <button @click="$broadcast('drink', 'GrandSon')">
      触发 GrandSon 的 drink 方法
    </button> -->
  </div>
</template>

<script>
import Parent from './components/Parent.vue'
export default {
  name: 'App',
  components: {
    Parent
  },
  data() {
    return {
      msg: 'Hello'
    }
  },
  methods: {
    eat(value) {
      console.log('eat >>> ', value)
    }
  }
}
</script>

<style lang="scss" scoped></style>
